package gnar.euler
import gnar.euler.math.Fib
import scala.collection.mutable.ListBuffer

class ProblemTwo extends Problem{
  override def solve() = {
    printf("P2 ans: %d\n" , evenFib(4000000).reduceLeft(_+_))
  }
  
  def evenFib(maxSize: Int): ListBuffer[Int] = {
    for(i <- Fib genFibList maxSize  if i % 2 == 0) yield i 
  }
}